Skip to content

agentdb: a numeric error code with name and description; wire deadline, frame bounds and capabilities - #1983

Merged
theomonnom merged 9 commits into
mainfrom
theo/agentdb-error-codes
Nov 16, 2026
Merged

theomonnom merged 9 commits into
mainfrom
theo/agentdb-error-codes

Conversation

@theomonnom

@theomonnom theomonnom commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

AgentDB.Wire.Error carries a numeric code, its name and a description. The protocol declares no codes: agent-db keeps the table, each code saying whether a request answered with it may have applied and whether it may be retried, and clients branch on the number. name and description keep fields 1 and 2, so a reader of the old string code reads the name.

Wire fields: Hello.client_version, Hello.max_frame (0 = server default); HelloOk.capabilities (repeated Wire.Capability: IF_TIP); ClientMessage.deadline_ms (budget at send, 0 = server default); Batch.if_tip (optional int64, like every tip). Begin, Commit and Rollback are unsupported: a request is one transaction.

@changeset-bot

changeset-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fce1284

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@livekit/protocol Patch
github.com/livekit/protocol Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

…t and seq, bounds frames and lists capabilities

One deadline: ClientMessage.deadline_ms is the caller's budget at send.
Keyed requests: Hello.client_id with ClientMessage.seq keys a write so a
resend applies it at most once; Batch.if_tip applies only at that tip.
Hello.max_frame bounds every server frame; HelloOk.capabilities lists
what the server supports beyond the base protocol.
… transaction

Keyed requests: a Batch with if_tip replaces a transaction held across
requests.
… a window of each client's last 16 keyed writes
…the codes and what they mean are agent-db's

The ErrorCode enum and its applied and retry options leave the protocol:
agent-db keeps its table of codes, and a client branches on the number.
Error keeps name and description in fields 1 and 2, so an older reader of
the string code reads the name.

Keyed writes are gone: Hello.client_id, ClientMessage.seq and the
KEYED_WRITES capability.
@theomonnom theomonnom changed the title agentdb: one error code vocabulary with applied/retry as data agentdb: a numeric error code with name and description; wire deadline, frame bounds and capabilities Nov 16, 2026
@theomonnom
theomonnom marked this pull request as ready for review November 16, 2026 03:04
@theomonnom
theomonnom merged commit c6a1648 into main Nov 16, 2026
9 checks passed
@theomonnom
theomonnom deleted the theo/agentdb-error-codes branch November 16, 2026 03:12
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
theomonnom added a commit to livekit/rust-sdks that referenced this pull request Nov 16, 2026
Moves the protocol submodule to livekit/protocol c6a16489
(livekit/protocol#1983): AgentDB.Wire.Error is {code, name,
description}; Hello carries client_version; if_tip, capabilities,
max_frame and deadline_ms are removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants